﻿using System.Windows.Forms;
using Habanero.Faces.Base;
using Habanero.Faces.Win;

namespace Firestarter.DB.Schema.UI
{

    public class DatabaseInfoTreeViewWin : TreeViewWin, ITreeView
    {
        public DatabaseInfoTreeViewWin() : this(GlobalUIRegistry.ControlFactory)
        {           
        }

        public DatabaseInfoTreeViewWin(IControlFactory controlFactory) : base(controlFactory)
        {
        }

        ///<summary>
        /// Calls the <see cref="TreeViewWin.MouseClick"/> event.
        /// This method is only used for Testing.
        ///</summary>
        ///<param name="mouseEventArgs">The <see cref="MouseEventArgs"/> to give to the event being fired.</param>
        public void PerformMouseClick(MouseEventArgs mouseEventArgs)
        {
            OnMouseClick(new MouseEventArgs(mouseEventArgs.Button, mouseEventArgs.Clicks, mouseEventArgs.X, mouseEventArgs.Y, mouseEventArgs.Delta));
        }
    }

}